package com.ljh.gmall.user.controller;



import com.ljh.gmall.bean.UmsMember;
import com.ljh.gmall.bean.UmsMemberReceiveAddress;
import com.ljh.gmall.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * @author LJH
 */
@Controller
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping("index")
    @ResponseBody
    public String index(){

        return "xx";
    }


    @RequestMapping("getAllUser")
    @ResponseBody
    public List<UmsMember> getAllUser(){
        return userService.getAllUser();
    }


    @RequestMapping("getUmsMemberAddressById")
    @ResponseBody
    public List<UmsMemberReceiveAddress> getUmsMemberAddressById(String memberId){
        return userService.getUmsMemberAddressById(memberId);
    }
}
